Harden Agent OS installation and adapters - #348
Conversation
rapharina
left a comment
There was a problem hiding this comment.
Thanks for the detailed work here. I’m requesting changes rather than merging because the PR currently combines several unrelated scopes and its installer design conflicts with the direction of the current profile/skills architecture.
What I’d like to keep from this PR:
- explicit argument parsing and
set -Eeuo pipefail --project-dir,--target,--dry-run,--yes, and--force- staged writes, manifests, local-change protection, and path/symlink validation
- doctor and manifest-scoped uninstall
- ShellCheck plus functional installer tests
Why I can’t merge it as-is:
- The PR mixes installer hardening, adapters, an LLM router/optimizer, release preparation, and usage documentation. Please split those into separate PRs; the installer-hardening portion is the part I’d most like to revisit first.
- The installer still assumes
profiles/<profile>/standards, while the current architecture is moving toward flat profile directories with structuredindex.yml, global governance, and profile-declared curated skills. - The Codex adapter generates
agent-os-*skills from command markdown. That conflicts with installing curated, profile-specific skills such aslian-harness,lian-frontend-harness, andlian-dbhub. - Portability is not established. On macOS, the core installer failed at
realpath -m, andsha256sumis not available by default. The full submitted test run also did not complete locally; it failed inllm/optimizer.pyatzip(..., strict=True)before reaching the installer tests. - No GitHub checks have run on this PR head.
Suggested next step: open a smaller installer-hardening-only PR rebased on the current profile/skills layout, with the staged-write/manifest/path-validation design and CI. The adapter and LLM optimizer work can then be reviewed separately.
|
Thanks @rapharina for the detailed review and clear direction. I agree that this PR combined too many scopes. I've opened the installer-hardening-only replacement in #351, based on current upstream macOS portability is addressed, and Linux/macOS CI on the exact PR head passes ShellCheck and all 37 functional tests on each platform. The macOS tests run both the harness and every installer script under system Bash 3.2. The diff-scoped strict audit passes, and the separate DeepSeek review is documented on the replacement PR with no outstanding P1/P2 findings. Adapter generation, the LLM router/optimizer, release preparation, and broad usage documentation are outside the replacement. Adapter and optimizer work remain separate follow-up considerations rather than publication promises. I've closed this broader PR as superseded by #351. Thanks again for identifying the useful installer-hardening subset and the compatibility gaps. |
Summary
Why
The packaged default profile did not install correctly, shell counters could
terminate scripts under
set -e, nested standards collided in the YAML index,and profile names could escape the intended directory. Installation also only
implemented a Claude-specific destination despite broader compatibility claims.
Impact
Existing unmanaged standards are preserved. Manifest-managed local edits fail
closed unless
--forceis explicitly supplied. Installations can be previewedwith
--dry-run, diagnosed withdoctor.sh, and removed using the scopedmanifest-based uninstaller.
Validation
bash -n scripts/*.sh install_agent_os.sh tests/run.sh./tests/run.sh— 14/14 passedconfig.ymland.github/workflows/test.ymlgit diff --checkcae8e664fb59a01869718c3151e0f45b7a06a2fb— 19 changed files, 0 scoped findings